<div bsModal #createOrEditModal="bs-modal" (onShown)="onShown()" class="modal fade" tabindex="-1" role="dialog"
  aria-labelledby="createOrEditModal" aria-hidden="true" [config]="{ backdrop: 'static', keyboard: !saving }">
  <div class="modal-dialog modal-lg">
    <div class="modal-content">
      <form *ngIf="active" #userForm="ngForm" novalidate (ngSubmit)="save()" autocomplete="off">
        <div class="modal-header">
          <h4 class="modal-title">
            <span>交货确认信息录入</span>
          </h4>
          <button type="button" class="close" (click)="close()" [attr.aria-label]="l('Close')" [disabled]="saving">
            <span aria-hidden="true">&times;</span>
          </button>
        </div>
        <div class="modal-body">
          <div class="row">
            <div class="form-group col-md-2">
              <label for="taskCode">任务号 </label>
            </div>
            <div class="form-group col-md-4">
              <input id="taskCode" #codeInput="ngModel" class="form-control" type="text" name="taskCode"
                [(ngModel)]="_processingDeliveryViewDto.taskCode" disabled />
            </div>
            <div class="col-md-2">
              <label for="picNo">产品图号 *</label>
            </div>
            <div class="form-group col-md-4">
              <input id="picNo" #picNoInput="ngModel" type="text" name="picNo" class="form-control"
                [(ngModel)]="_processingDeliveryViewDto.picNo" disabled />
            </div>
          </div>
          <div class="row">
            <div class="col-md-2">
              <label for="taskName">产品名称 </label>
            </div>
            <div class="form-group col-md-4">
              <input id="taskName" #taskNameInput="ngModel" type="text" name="taskName" class="form-control"
                [(ngModel)]="_processingDeliveryViewDto.taskName" disabled />
            </div>

            <div class="col-md-2">
                <label for="ProcessingAmount">加工数量 *</label>
              </div>
              <div class="form-group col-md-4">
                <p-spinner size="20" name="processingAmount" [(ngModel)]="_processingDeliveryViewDto.processingAmount" [min]="0" [max]="100"></p-spinner> 
              </div>
          </div>
          <div class="row">
              <div class="col-md-2">
                  <label for="Progressrequest">进度要求 *</label>
                </div>
                <div class="form-group col-md-4"> 
                  <input id="Progressrequest" type="text" #ProgressrequestInput name="Progressrequest" class="form-control"  
                    [(ngModel)]="requestdate"  required bsDatepicker disabled> 
                </div>
            <div class="col-md-2">
              <label for="DeliveryAmount">验收数量 *</label>
            </div>
            <div class="form-group col-md-4">
              <p-spinner size="20" name="DeliveryAmount" #DeliveryAmountInput="ngModel" [(ngModel)]="_processingDeliveryViewDto.deliveryAmount" [min]="0" [max]="_processingDeliveryViewDto.processingAmount" required></p-spinner> 
              <validation-messages [formCtrl]="DeliveryAmountInput"></validation-messages>
            </div>
          </div>
          <div class="row">
            <div class="col-md-2">
              <label for="DeliveryDate">验收日期 *</label>
            </div>
            <div class="form-group col-md-4"> 
              <input id="DeliveryDate" type="text" #DeliveryDateInput name="DeliveryDate" class="form-control"
                [(ngModel)]="_processingDeliveryViewDto.deliveryDate" required bsDatepicker (ngModelChange)="dateDifference()">
              <validation-messages [formCtrl]="DeliveryDateInput"></validation-messages>
            </div>
            <div class="col-md-2">
              <label for="PassedAmount">合格数量 *</label>
            </div>
            <div class="form-group col-md-4">
              <p-spinner size="20" name="PassedAmount" #PassedAmountInput="ngModel" [(ngModel)]="_processingDeliveryViewDto.passedAmount" [min]="0"  required></p-spinner>  
              <validation-messages [formCtrl]="PassedAmountInput"></validation-messages>
            </div>
          </div>
          <div class="row">
            <div class="col-md-2">
              <label for="QuantityAmount">超差数量 *</label>
            </div>
            <div class="form-group col-md-4">
              <p-spinner size="20" name="QuantityAmount" #QuantityAmountInput="ngModel" [(ngModel)]="_processingDeliveryViewDto.quantityAmount" [min]="0"  required></p-spinner>  
              <validation-messages [formCtrl]="QuantityAmountInput"></validation-messages>
            </div>
            <div class="col-md-2">
                <label for="NoPassedAmount">报废数量 *</label>
              </div>
              <div class="form-group col-md-4">
                <p-spinner size="20" name="NoPassedAmount" #NoPassedAmountInput="ngModel" [(ngModel)]="_processingDeliveryViewDto.noPassedAmount" [min]="0"  required></p-spinner> 
                <validation-messages [formCtrl]="NoPassedAmountInput"></validation-messages>
              </div> 
          </div>
          <div class="row">
              <div class="col-md-2">
                <label for="QualityControlCardNo">质控卡编号 *</label>
              </div>
              <div class="form-group col-md-4"> 
                <input id="QualityControlCardNo" type="text" #QualityControlCardNoInput name="QualityControlCardNo" class="form-control"
                  [(ngModel)]="_processingDeliveryViewDto.qualityControlCardNo" required >
                <validation-messages [formCtrl]="QualityControlCardNoInput"></validation-messages>
              </div>
              <div class="col-md-2">
                <label for="IsOverdue">是否逾期</label>
              </div>
              <div class="form-group col-md-4">
                <input  type="text" *ngIf="_processingDeliveryViewDto.overdueDay > 0"  class="form-control" value="是" disabled>
                <input  type="text" *ngIf="_processingDeliveryViewDto.overdueDay <= 0"  class="form-control" value="否" disabled>
              </div>
            </div>
            <div class="row">
                <div class="col-md-2">
                  <label for="OverdueDay">逾期天数 *</label>
                </div>
                <div class="form-group col-md-4"> 
                  <input id="OverdueDay" type="text" #OverdueDayInput name="OverdueDay" class="form-control"
                    [(ngModel)]="_processingDeliveryViewDto.overdueDay" disabled required>
                  <validation-messages [formCtrl]="OverdueDayInput"></validation-messages>
                </div>
                <div class="col-md-2">
                  <label for="Remarks">备注</label>
                </div>
                <div class="form-group col-md-4">
                    <input id="Remarks" type="text" #RemarksInput name="Remarks" class="form-control"
                    [(ngModel)]="_processingDeliveryViewDto.remarks" required>
                  <validation-messages [formCtrl]="RemarksInput"></validation-messages>
                </div>
              </div>
        </div>
        <div class="modal-footer">
          <button [disabled]="saving" type="button" class="btn btn-default" (click)="close()">
            取消
          </button>
          <button type="submit" class="btn btn-primary" [disabled]="!userForm.form.valid" [buttonBusy]="saving"
            [busyText]="l('SavingWithThreeDot')">
            <i class="fa fa-save"></i> <span>保存</span>
          </button>
        </div>
      </form>
    </div>
  </div>
</div>